package com.coocaa.typhoon.api.config;

import com.coocaa.cirrus.common.third.filestore.config.TosProperties;
import com.coocaa.typhoon.api.third.volcengine.yml.VolcConfigYml;
import com.volcengine.service.vikingDB.CollectionClient;
import com.volcengine.service.vikingDB.IndexClient;
import com.volcengine.service.vikingDB.VikingDBService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author bijiahao
 * @date : 2025/9/19 17:02
 * @description
 */
@Configuration
public class VikingDbConfig {
    @Autowired
    private TosProperties tosProperties;
    @Autowired
    private VolcConfigYml volcConfigYml;

    @Bean
    public VikingDBService vikingDBService() throws Exception {
        VikingDBService vikingDBService = new VikingDBService(volcConfigYml.getVikingDbHost(), tosProperties.getTosRegionName(), tosProperties.getTosSecretId(), tosProperties.getTosSecretKey(), "https");
        return vikingDBService;
    }
}
